package rules;

import stock.Company;

public class BuyRule12 extends Rule {

	@Override
	public boolean matches(Company company) {
	
		//Percentage Week Variation
		boolean negativePercentageVariation = ((((company.getWeekInfo().get(4)/company.getWeekInfo().get(0))-1)*100) <= (-7));
		
		if ( negativePercentageVariation ){
			return this.next(company);
		}else{
			return false;
		}
	}

}